package programs.expression.implementedClasses;

import java.util.HashSet;
import java.util.Set;

import programs.expression.superClasses.Expression;
import programs.expression.superClasses.ExpressionType;

public class GetDirection extends Expression {

	@Override
	public ExpressionType getReturnType() {
		return ExpressionType.DOUBLE;
	}

	@Override
	public boolean isValidExpression() {
		return true;
	}

	@Override
	public Expression assignGlobalVariable(Variable variable) {
		return this;
	}
	
	@Override
	public Object getValue() {
		return (Double) getExecuter().getDirection();
	}
	
	@Override
	public Set<Variable> getVariables(){
		return new HashSet<Variable>();
	}

}
